<?php
/**
 * author      :chenwenwen
 * createTime  :2020-04-05 21:40
 * description :
 */
namespace app\demo\controller;
use app\BaseController;
use app\common\business\Demo;

class Index extends BaseController {
    public function index() {
        echo time();
    }

    public function demo() {
        $demo = new Demo();
        $list = $demo->getDemoDataByCategoryId(1);
        return show(config('status.success'),'success',$list);
    }

    public function e() {
        //echo $abc;
        throw new \think\exception\HttpException(400,'找不到相应模块');
    }

    public function m() {
        dump($this->request->type);
        dump(2);
    }

    public function d() {
        dump($this->request->type);
        dump(2);
    }
}